<?php

declare(strict_types=1);
/**
 * This file is part of habo_new_media.
 *
 * @link     https://www.berlen.cn/
 * @contact  tech@berlen.cn
 * @license  http://gitlab.rehou.cn/habo/habo_new_media/-/blob/master/README.md
 */
namespace app\enum;

class NoticeEnum
{
    /**
     * @var string 提醒队列
     */
    public const NOTICE_LIST_KEY = 'notice:' . RedisEnum::REDIS_HASH;

    /**
     * @var int 邮箱类型
     */
    public const NOTICE_TYPE_EMAIL = 1;

    /**
     * @var int 钉钉类型
     */
    public const NOTICE_TYPE_DING_TALK = 2;

    /**
     * @var int 飞书类型
     */
    public const NOTICE_TYPE_FS = 3;

    /**
     * @var int 企业微信类型
     */
    public const NOTICE_TYPE_QYWX = 4;

    /**
     * @var int 飞书webhook
     */
    public const NOTICE_TYPE_FS_WEBHOOK = 5;

    /**
     * @var int 钉钉webhook
     */
    public const NOTICE_TYPE_DING_TALK_WEBHOOK = 6;

    /**
     * @var int 企业微信webhook
     */
    public const NOTICE_TYPE_WE_CHAT_WEBHOOK = 7;

    /**
     * @var array 通知类型
     */
    public const NOTICE_TYPE_NAME = [
        self::NOTICE_TYPE_EMAIL => '邮箱',
        self::NOTICE_TYPE_DING_TALK => '钉钉',
        self::NOTICE_TYPE_FS => '飞书',
        self::NOTICE_TYPE_QYWX => '企业微信',
        self::NOTICE_TYPE_FS_WEBHOOK => '飞书webhook',
        self::NOTICE_TYPE_DING_TALK_WEBHOOK => '飞书webhook',
    ];

    /**
     * @var string 通知类
     */
    public const NOTICE_CLASS = [
        self::NOTICE_TYPE_EMAIL => '\app\service\notice\email\EmailService',
        self::NOTICE_TYPE_DING_TALK => '\app\service\notice\dingtalk\DingTalkService',
        self::NOTICE_TYPE_FS => '\app\service\notice\feishu\FeiShuService',
        self::NOTICE_TYPE_QYWX => '\app\service\notice\qywx\QywxService',
        self::NOTICE_TYPE_FS_WEBHOOK => '\app\service\notice\feishu\FeiShuWebHookService',
        self::NOTICE_TYPE_DING_TALK_WEBHOOK => '\app\service\notice\dingtalk\DingTalkWebHookService',
        self::NOTICE_TYPE_WE_CHAT_WEBHOOK => '\app\service\notice\qywx\QywxWebHookService',
    ];

    /**
     * @var array 飞书webhook机器人配置
     */
    public const FEI_SHU_WEBHOOK = [
        'cdc' => [
            'link' => '/open-apis/bot/v2/hook/5d460fe5-8ea1-45b4-bf7b-b5377da88be4',
            'sign' => 'MrGvW71NXvLTjAuYUXQFVb',
            'type' => 'interactive',
            'bot_name' => '数据平台预警机器人',
        ],
    ];
}
